﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

    class RealNumbersFinder
    {
       public static string pattern = @"\A0\Z|\A-?([1-9]+\Z|\A-?([0-9]{1}\.[1-9]+[0-9]*\Z|([1-9]+)(\.)+[0-9]+))\Z";
       
       public static string IsNumberReal(string number)
        {
            Regex regex = new Regex(pattern);
            Match match = regex.Match(number);
            Console.WriteLine(match.Value);
            return match.Value;
        }
        
        static void Main(string[] args)
        {
            string text = "-2381.78132";
             string output = IsNumberReal(text)== text ? string.Format("{0} is a real number match.", text) : string.Format("{0} is not a real number match.", text);

            Console.WriteLine(output);
        }
    }

